const { defineConfig } = require("@vue/cli-service");
const path = require('path');
function resolve (dir){
  return path.resolve(dir)
}


module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  //开发服务器配置
  devServer:{ 
    port:1234,
    proxy:{
      '/api':{
        target:'http://chst.vip',
        pathRewrite:{
          '^/api':''
        }
      }
    }

  },
  chainWebpack: (config) => { //配置别名,合并webpack配置
    config.resolve.alias
      .set('&', resolve('src'))
      .set('assets', resolve('src/assets'))
      .set('components', resolve('src/components'))
      .set('layout', resolve('src/layout'))
      .set('base', resolve('src/base'))
      .set('static', resolve('src/static'))
  }
});
